import request from '@/utils/request'
// import  requestBase from  '@/utils/requestBase'

// 查询微客历史客户列表
export function listCusthistory(query) {
  return request({
    url: '/sysCust/custhistory/list',
    method: 'get',
    params: query,
    timeout:60000
  })
}

// 查询微客历史客户详细
export function getCusthistory(id) {
  return request({
    url: '/sysCust/custhistory/' + id,
    method: 'get'
  })
}

// 新增微客历史客户
export function addCusthistory(data) {
  return request({
    url: '/sysCust/custhistory',
    method: 'post',
    data: data
  })
}

// 修改微客历史客户
export function updateCusthistory(data) {
  return request({
    url: '/sysCust/custhistory',
    method: 'put',
    data: data
  })
}

// 删除微客历史客户
export function delCusthistory(id) {
  return request({
    url: '/sysCust/custhistory/' + id,
    method: 'delete'
  })
}

// 导出微客历史客户
export function exportCusthistory(query) {
  return request({
    url: '/sysCust/custhistory/export',
    method: 'get',
    params: query,
    timeout: 600000
  })
}


export function tocrm(data) {
  return request({
    url: '/sysCust/custhistory/tocrm',
    method: 'post',
    data: data
  })
}

//批量派发
export function tocrms(data) {
  return request({
    url: '/sysCust/custBusiness/assign',
    method: 'post',
    data: data
  })
}

// 员工查询
export function searchHnStaff(data) {
  return request({
    url: '/basic/sql/selectList',
    method: 'post',
    data: data
  })
}
